Skip to content

ci: optimize pull request checks - #6938

Open
bladehan1 wants to merge 2 commits into
tronprotocol:developfrom
bladehan1:feature/ci_refactor
Open

ci: optimize pull request checks#6938
bladehan1 wants to merge 2 commits into
tronprotocol:developfrom
bladehan1:feature/ci_refactor

Conversation

@bladehan1

@bladehan1 bladehan1 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Remove four invocation-wide --no-build-cache flags from Debian and Coverage Base builds and RocksDB tests.
  • Require PR titles to follow type(scope): description, including a space immediately after the colon, and provide a dedicated error when that space is missing.
  • Route a bare ci: description title to the existing ci reviewer scope; explicit scopes still take precedence and other bare types retain default reviewers.

Why are these changes required?

The repository already enables Gradle Build Cache. However, four x86 Gradle invocations disable task-output cache reads and writes globally. Removing those flags enables reuse for eligible compile, package, Checkstyle, and test tasks.

CONTRIBUTING.md requires the type: description or type(scope): description format and states that CI enforces it. Requiring the space after the colon keeps validation consistent with the documented rule, while the dedicated error makes the correction explicit.

Since ci is also an existing reviewer scope, a bare ci type can be mapped without inventing mappings for unrelated types.

This PR has been tested by:

  • YAML AST parsing for .github/workflows/pr-build.yml, .github/workflows/pr-check.yml, and .github/workflows/pr-reviewer.yml
  • Shell validation of 12 positive and negative PR-title cases across 1,000 rounds, totaling 12,000 assertions
  • Reviewer extraction cases for explicit scopes, bare ci, and other bare types
  • Verification that the four x86 commands no longer contain --no-build-cache
  • git diff --check
  • Forced local execution without task-cache reuse: ./gradlew -g /private/tmp/java-tron-gradle-home :framework:checkstyleMain :framework:checkstyleTest :plugins:checkstyleMain --no-daemon --no-build-cache
  • Local :framework:testWithRocksDb cache validation: an identical-input clean run restored the task FROM-CACHE; changing -DrunPrecompileBenchmark=true caused the task to execute while unrelated eligible tasks remained cached

Follow up

  • Use task-specific --rerun if a future test contract requires real execution for every CI run.

Extra details

  • clean removes project build/ output but does not remove $GRADLE_USER_HOME/caches/build-cache-1; eligible outputs can therefore be restored after clean.
  • This PR does not change node runtime, consensus, state, database, RPC, configuration, or protocol behavior.

enable task-output caching for x86 build and coverage jobs
align PR title validation and reviewer routing with contributing rules
Comment thread .github/workflows/pr-check.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants